package com.fsu.database.dao;

/**
 * Structure for information about a user
 * @author Bonazza
 *
 */
public class User {
	/**
	 * User's username
	 */
	private String username;
	/**
	 * User's password
	 */
	private String password;
	/**
	 * User's full name
	 */
	private String name;
	/**
	 * User's email address
	 */
	private String email;
	/**
	 * User's personal address
	 */
	private String address;
	/**
	 * User's phone number
	 */
	private String phone;
	/**
	 * Is the user an admin?
	 */
	private boolean isAdmin;
	
	/**
	 * Constructor
	 * @param username
	 * @param password
	 * @param name
	 * @param email
	 * @param address
	 * @param phone
	 * @param isAdmin
	 */
	public User(String username, 
			String password, 
			String name,
			String email,
			String address,
			String phone,
			boolean isAdmin) {
		this.username = username;
		this.password = password;
		this.name = name;
		this.email = email;
		this.address = address;
		this.phone = phone;
		this.isAdmin = isAdmin;
	}
	
	/** Accessor methods **/
	public String getUsername() { return username; }
	public String getPassword() { return password; }
	public String getName() { return name; }
	public String getEmail() { return email; }
	public String getAddress() { return address; }
	public String getPhone() { return phone; }
	public boolean isAdmin() { return isAdmin; }
	
	/** Mutator methods **/
	public void setUserName(String username) { this.username = username; }
	public void setPassword(String password) { this.password = password; }
	public void setName(String name) { this.name = name; }
	public void setEmail(String email) { this.email = email; }
	public void setAddress(String address) { this.address = address; }
	public void setPhone(String phone) { this.phone = phone; }
	
	
	public String toString() {
		return "username: " + username + "\npassword: " + password + "\nname: " + name + "\nemail: " + email +
				"\naddress: " + address + "\nphone: " + phone + "\nis admin: " + isAdmin;
	}
}
